package com.example.internet;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * 创建数据库
 */
public class Sql extends SQLiteOpenHelper {
    private static final int VERSION = 1;
    private static final String MYNOTE = "computer.db";

    public Sql(Context context){
        super(context, MYNOTE, null, VERSION);
    }

    public void onCreate(SQLiteDatabase db){// 创建数据库

        db.execSQL("create table computerdb (date varchar,num varchar,state1 varchar,state2 varchar)");
    }

    @Override
    public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
    }
}

